<?php
namespace app\admin\validate;
use think\Validate;
class Admin extends Validate{
    protected $rule = [
        'username' => 'require|max:25|unique:admin',
        'password' => 'require'
    ];
    protected $message = [
        'username.require' => '用户名必填aaa',
        'username.max' => '最大长度超过25',
        'username.unique' => '管理员名称不得重复',
        'password.require' => '密码必填'
    ];
}